package com.gx.model.vo;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gx.model.dto.definition.FlowCommentDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>工作流任务<p>
 *
 * @author XuanXuan
 * @date 2021-04-03
 */
@Data
@ApiModel("工作流任务相关-返回参数")
public class FlowTaskVo implements Serializable {

    @ApiModelProperty("任务编号")
    private String taskId;

    @ApiModelProperty("任务名称")
    private String taskName;

    @ApiModelProperty("任务执行人Id")
    private String assigneeId;

    @ApiModelProperty("审批组信息")
    private List<String> assigneeGroups;

    @ApiModelProperty("多人审批人")
    private List<String> candidateUsers;

    @ApiModelProperty("流程发起人Id")
    private String startUserId;

    @ApiModelProperty("流程发起人昵称")
    private String startUserName;

    @ApiModelProperty("流程类型")
    private String category;

    @ApiModelProperty("流程变量信息")
    private Map<String, Object> procVars;

    @ApiModelProperty("流程部署id")
    private String deployId;

    @ApiModelProperty("流程定义ID")
    private String procDefId;

    @ApiModelProperty("流程定义名称")
    private String procDefName;

    @ApiModelProperty("流程实例ID")
    private String instanceId;

    @ApiModelProperty("任务耗时")
    private String duration;

    @ApiModelProperty("任务意见")
    private FlowCommentDto comment;

    @ApiModelProperty("任务创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("任务完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

    @ApiModelProperty("流程触发时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty("当前流传任务")
    private JSONObject nowTask;

    @ApiModelProperty("当前活动任务Id")
    private String nowTaskId;
}
